//var p=window.createPopup();
function fctShowPopup(sText, iX, iY, iW, iH)
{	
	var pbody=p.document.body;
	var sText, iX, iY, iW, iH;
	
	pbody.style.backgroundColor="#FFFFCC";
	pbody.style.font="normal 10px arial";
	pbody.style.border="solid black 1px";
	pbody.innerHTML=sText;
	p.show(iX,iY,iW,iH,document.body);
}
function fctHidePopup()
{
	p.hide()
}
function fctHideLinks()
{
	document.getElementById("sdivSponsors").style.visibility="visible";
	document.getElementById("sdivSponsors").style.display="";
	document.getElementById("sdivOtherLinks").style.visibility="hidden";
	document.getElementById("sdivOtherLinks").style.display="none";
	//document.getElementById("img_01").src="icon_more_close.gif";
	//document.getElementById("img_02").src="icon_more.gif";
}
function fctShowLinks()
{
	document.getElementById("sdivSponsors").style.visibility="hidden";
	document.getElementById("sdivSponsors").style.display="none";		
	document.getElementById("sdivOtherLinks").style.visibility="visible";
	document.getElementById("sdivOtherLinks").style.display="";	
	//document.getElementById("img_01").src="icon_more.gif";
	//document.getElementById("img_02").src="icon_more_close.gif";	
}
function confirmDel()
{
	var agree=confirm("Do yo want to delete this record?");
	if (agree)
		return true;
	else
		return false;
}
function confirmProceed()
{
	var agree=confirm("Do yo want to run this process?");
	if (agree)
		return true;
	else
		return false;
}
function confProceed()
{
	var agree=confirm("Do yo want to proceed?");
	if (agree)
		return true;
	else
		return false;
}
function startTime()
{
	var today=new Date();
	//h=today.toGMTString();
	var h=today.getHours();
	var m=today.getMinutes();
	var s=today.getSeconds();
	
	var d=today.getDate();
	var mt=today.getMonth();
	var y=today.getFullYear();
	var mtn="";

	var months = new Array(13);
	months[0] = "Jan";
	months[1] = "Feb";
	months[2] = "Mar";
	months[3] = "Apr";
	months[4] = "May";
	months[5] = "Jun";
	months[6] = "Jul";
	months[7] = "Aug";
	months[8] = "Sep";
	months[9] = "Oct";
	months[10] = "Nov";	
	months[11] = "Dec";
	
	m=checkTime(m, "n");
	s=checkTime(s, "y");	

	mtn=months[mt];
	document.getElementById('sdivTime').innerHTML=""+d+"-"+mtn+"-"+y+" "+h+":"+m+":"+s;
	//document.getElementById('sdivTime').innerHTML="Belfast, Northern Ireland, "+h;	
	t=setTimeout('startTime()', 1000);	
}
function checkTime(i, sFlag)
{
	if (i<10)
  	{
  		i="0" + i;
  	}
	//if (sFlag == "y")
	//{
	//	if (i>=12)
	//	{
		//	i=i+" p.m.";
		//}
		//else
		//{
		//	i=i+" a.m.";
		//}
	//}
	return i;
}
function loginSetFocus()
{
	if (document.getElementById('login_name')!=null)
	{
		document.getElementById('login_name').focus();
	}
}
function fctGetFocus(element)
{
	element.style.border = "2px solid #ff0000";
}
function fctLostFocus(element)
{
	element.style.border = "1px solid #000000";
}
function IsNumeric(sText)
{
   var ValidChars = "0123456789.";
   var IsNumber=true;
   var Char;

 
   for (i = 0; i < sText.length && IsNumber == true; i++) 
   { 
      Char = sText.charAt(i); 
      if (ValidChars.indexOf(Char) == -1) 
      {
  	      IsNumber = false;
      }
   }
   return IsNumber;   
}
